// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 菜单分页列表 GET /api/v1/menu/listPage */
export async function menuListPageUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.menuListPageUsingGETParams,

  options?: { [key: string]: any },
) {
  return request<API.ApiResponsePageUtils>('/api/v1/menu/listPage', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 树形菜单列表 GET /api/v1/menu/menuTreeList */
export async function menuTreeListUsingGET(options?: { [key: string]: any }) {
  return request<API.ApiResponseListMenuVo>('/api/v1/menu/menuTreeList', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 动态路由列表 GET /api/v1/menu/queryDynamicRoutes */
export async function queryDynamicRoutesUsingGET(options?: { [key: string]: any }) {
  return request<API.ApiResponseListRouteVo>('/api/v1/menu/queryDynamicRoutes', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 菜单详情 GET /api/v1/menu/${param0} */
export async function menuInfoUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.menuInfoUsingGETParams,

  options?: { [key: string]: any },
) {
  const { menuId: param0, ...queryParams } = params;
  return request<API.ApiResponseMenuVo>(`/api/v1/menu/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}
